In recent decades, since the use of computers has become prevalent, the number and type of useful computer applications is expanding, as is their complexity. Furthermore, the world is increasingly populated with information sources where in many cases the data is represented differently from source to source. Thus, increasingly, applications involve using more than one data model. For example, an application might read and manipulate data from one source, in which data is stored in object form, and another source, in which data is stored in relational database form. As another example, a web-based XML application may sometimes be required to utilize data of another type, such as relational database data. In one common scenario, for example, an XML application generates and manipulates XML documents that appear to the user to exist in files or as network packets, when in fact, they are being created on demand through translation from relational database representations.
For these applications, it is necessary to develop some method or apparatus whereby fundamental operations, such as operations that accomplish the reading and writing of data, in one data model, are translated into accurate corresponding operations in another data model, and vice versa. It is similarly necessary to be able to accurately convert a structural representation of one data model to a corresponding equivalent structural representation in another data model.
To solve these problems, methods of mapping between data models have been developed. However, the task of transforming between data models is still very costly and often inefficient as witnessed by the endless list of products that provide some form of mapping between data models. Attempted solutions to the problem of data model mapping have included approaches that add extensions to query languages (e.g., in the “FOR XML” and “OPEN XML”) products, approaches that explicitly generate code conforming to one or another data model, and declarative mapping approaches. However, in general, these products tend to be specific to particular data models and of limited applicability.
Thus, a generally applicable, unified and declarative mapping approach allowing mapping between any two data models was developed and disclosed in commonly assigned U.S. patent application Ser. No. 10/652,214 filed on Aug. 29, 2003, entitled “MAPPING ARCHITECTURE FOR ARBITRARY DATA MODELS,” the contents of which is hereby incorporated by reference. That application specifies the syntax of an innovative declarative mapping approach.
But in order for a declarative mapping approach to be not only generally applicable, but also generally accepted, and optimally useful, it would be advantageous if it ensured that the mapping performed using the approach was always both bi-directional and composable. There is therefore a need for a generally applicable, unified, data model mapping approach that is both bi-directional and composable.